package com.stedu.mall.common.service;

import com.github.pagehelper.PageInfo;
import com.stedu.mall.common.bean.User;
import com.stedu.mall.common.exception.SteduException;

import java.math.BigDecimal;

public interface UserService {
    User login(String username,String password) throws SteduException;
    //注册
    boolean reg(User user) throws SteduException;
    //添加
    boolean insert(User user);
    //删除
    boolean delete(Integer id);
    //修改
    boolean update(User user);
    //根据id获取用户信息
    User selectById(Integer id);
    //查询全部
    PageInfo<User> selectAll(User user, Integer pageNum, Integer pageSize);
    boolean updateStatus(User user);

    boolean updateInfo(User user);

    boolean recharge(User user, BigDecimal money);

    //修改登录密码
    boolean updatePassword(String oldPassword, String newPassword, Integer id) throws SteduException;

    boolean updatePayPassword1(String oldPayPassword, String newPayPassword, Integer id) throws SteduException;

    boolean updatePayPassword2(String newPayPassword, Integer id) throws SteduException;
}
